<?php

namespace app\models;

use Yii;

/**
 * This is the model class for table "{{%advertiser}}".
 *
 * @property integer $id
 * @property string $name
 * @property string $total_budget
 * @property integer $category_id
 * @property integer $status
 * @property integer $ratio
 * @property string $site
 * @property string $adomain
 * @property string $site_code
 * @property string $convertion_name
 * @property integer $conversion_vest_method
 * @property integer $impression_vest_day
 * @property integer $click_vest_day
 * @property string $contactor
 * @property string $mobile
 * @property string $phone
 * @property string $fax
 * @property string $qq
 * @property string $email
 * @property string $last_update
 */
class Advertiser extends \app\models\BaseAR
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return '{{%advertiser}}';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['name'], 'required'],
            [['total_budget'], 'number'],
            [['category_id', 'status', 'ratio', 'conversion_vest_method', 'impression_vest_day', 'click_vest_day'], 'integer'],
            [['last_update'], 'safe'],
            [['name', 'convertion_name', 'contactor', 'email'], 'string', 'max' => 64],
            [['site', 'adomain'], 'string', 'max' => 255],
            [['site_code'], 'string', 'max' => 20],
            [['mobile', 'phone', 'fax'], 'string', 'max' => 32],
            [['qq'], 'string', 'max' => 16]
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'id' => 'ID',
            'name' => 'Name',
            'total_budget' => 'Total Budget',
            'category_id' => 'Category ID',
            'status' => 'Status',
            'ratio' => 'Ratio',
            'site' => 'Site',
            'adomain' => 'Adomain',
            'site_code' => 'Site Code',
            'convertion_name' => 'Convertion Name',
            'conversion_vest_method' => 'Conversion Vest Method',
            'impression_vest_day' => 'Impression Vest Day',
            'click_vest_day' => 'Click Vest Day',
            'contactor' => 'Contactor',
            'mobile' => 'Mobile',
            'phone' => 'Phone',
            'fax' => 'Fax',
            'qq' => 'Qq',
            'email' => 'Email',
            'last_update' => 'Last Update',
        ];
    }
}
